1. Field of the Invention
The present invention relates to image processing apparatuses and image processing programs and, more specifically, to an image processing apparatus and an image processing program for antialiasing an image to be displayed on a display.
2. Description of the Background Art
When an image including graphics, patterns, and others is displayed on a computer screen, some lines and boundary portions (or outline portions) of the graphics and patterns appear jagged on the screen because these graphics and patterns are composed of tiny square-shaped pixels. To smooth such jaggies, image processing called antialiasing is performed. Typical antialiasing includes oversampling and overlaying.
In oversampling, when a three-dimensional (3D) object represented by polygons is transformed to two-dimensional (2D) image data, for example, edge portions of the polygons are calculated at a resolution higher than that of display. Based on the calculation results, the color of the edge portions and background color are blended for display.
In overlaying, for example, after a 3D object is transformed to 2D image data, the color of a boundary portion of graphics and patterns is blended with the color of a portion surrounding the boundary portion for display.
The above-mentioned antialiasing, however, has drawbacks as follows.
That is, in oversampling, the edge portion of the polygons is calculated at a resolution higher than that of display. This requires larger memory capacity. Also, as calculation of the edge portion increases processing load, the processing load greatly varies depending on how many polygons are required to be drawn. For these reasons, oversampling is not suitable when stable operation is desired. Especially, in game processing, game images have to be stably generated with user's operation reflected thereon, at a rate of sixty images per second, for example. The larger the number of polygons to be drawn becomes, the more time the antialiasing takes, causing delay in game processing and, as a result, possibly causing a frame dropout.
In overlaying, on the other hand, the above-described color blending processing is carried out at every color boundary portion. That is, portions other than the jagged ones are also processed. Therefore, the entire boundary portion of graphics and patterns appears blurred, causing the entire image to appear blurred.